﻿using System.Collections.Generic;
using netCoreStudy.Attr.QueryAttr;
using netCoreStudy.Entities.Base;

namespace netCoreStudy.Entities
{
	/// <summary>
	/// 用户
	/// </summary>
	public class User : BaseEntity
	{
		/// <summary>
		/// 用户姓名
		/// </summary>
		public string Name { get; set; }

		/// <summary>
		/// 用户密码  
		/// </summary>
		public string Password { get; set; }

		/// <summary>
		/// 用户头像  
		/// </summary>
		public long MaterialId { get; set; }

		/// <summary>
		/// 用户头像  
		/// </summary>
		[Include]
		public Material Material { get; set; }
		// public string Avatar { get; set; }

		/// <summary>
		/// 多对多 角色 
		/// </summary>
		[Include("UserRoles.Role")]
		public List<UserRole> UserRoles { get; set; }
	}
}